﻿using FluentValidation;
using Jupiter.Infrastructure.Domain;
using MediatR;

namespace Wips.AppService.Publisher.PublishFlows.Requests
{
    /// <summary>
    /// 取消发布请求
    /// </summary>
    public class CancelPublishRequest:ITxRequest,IRequest<string>
    {
        /// <summary>
        /// 需要取消的发布流程Id
        /// </summary>
        public string Id { get; set; } = "";

    }


    /// <summary>
    /// 校验
    /// </summary>
    public class CancelPublishRequestValidator : AbstractValidator<CancelPublishRequest>
    {
        /// <summary>
        /// 
        /// </summary>
        public CancelPublishRequestValidator()
        {
            RuleFor(p => p.Id)
                .Must(p => !string.IsNullOrEmpty(p))
                .WithMessage("Id不能为空");




        }
    }
}
